<?php
class Session extends CmsAppModel
{
	var $useTable = false;
	var $actsAs = array();
	var $sessionInst = false;
	
	function read($name = null)
	{
		$this->getSessionInst();
		if(!$this->sessionInst->started())
		{
			return false;
		}
		return $this->sessionInst->read($name);
	}
	
	function write($key,$value)
	{
		$this->getSessionInst();
		$this->sessionInst->write($key,$value);	
	}
	
	function getSessionInst()
	{
		if(!$this->sessionInst)
		{
			uses('Session');
			$path = null;
			if(isset($GLOBALS['base_url']))
			{
				$path = $GLOBALS['base_url'];
			}
			$this->sessionInst = new CakeSession($path, false);
		}
	}

}
?>